# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=passt
pkgver=2023_11_19.4f1709d
pkgrel=1
pkgdesc="Plug A Simple Socket Transport"
arch=(loong64 x86_64)
url="https://passt.top/passt/about/"
license=(
  BSD-3-Clause
  GPL-2.0-or-later
)
depends=(glibc)
optdepends=(
  'sh: for demo script'
)
source=(https://passt.top/$pkgname/snapshot/$pkgname-$pkgver.tar.zst)
sha512sums=('1a4b2b35e36e3f042e6b9091e7e3ed5a3c232f3c5cd0af5af4dda4c54e4b6ce4c5d07f6df9ce4d391d7492e86538a0c73d5a0008f3dc9f59ab6d17da558be14f')
b2sums=('6cc6ba99a0f1c0532354912913dfb9cad7bd580300e96ff1ecea32b0100b7f5dcd5ce96e31ad4a989ef91c2b6d445acf27a076d17be404430bbc6b56e571cfb3')

build() {
  make -C $pkgname-$pkgver
}

package() {
  make DESTDIR="$pkgdir/" prefix=/usr install -C $pkgname-$pkgver
  install -vDm 644 $pkgname-$pkgver/LICENSES/* -t "$pkgdir/usr/share/licenses/$pkgname/"
}
